<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>css/basic.css" />
<link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>style/index.css" />
<script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.min.js"></script>
<link type="image/x-icon" rel="shortcut icon" href="<?php echo isset($skin)?$skin:"";?>img/favicon.ico" />
<script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/bootstrap.min.js"></script>
    <title><?php echo isset($webname)?$webname:"";?>会员登陆</title>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top nav_bg navbar_width">
    <div class="container">
        <div class="navbar-header">
            <a href="<?php echo url('index/index');?>" class="navbar-brand logo"><img src="<?php echo isset($skin)?$skin:"";?>img/logo.png" alt="<?php echo isset($webname)?$webname:"";?>"></a>
            <?php if($info->usersid > 0){?>
                <ul class="navbar_info">
                    <li>用户名: <span><?php echo isset($info->username)?$info->username:"";?></span></li>
                    <li>余额￥: <span><?php echo isset($info->points)?$info->points:"";?></span></li>
                </ul>
            <?php }else{?>
                <ul class="navbar_ul">
                    <li><a href="<?php echo url('users/reg');?>" class="btn-white btn-danger">注 册</a></li>
                    <li><a href="<?php echo url('users/login');?>" class="btn-white btn-success">登 陆</a></li>
                </ul>
            <?php }?>


<!--           -->
<!--            <button type="button" class="navbar-toggle white" data-toggle="collapse" data-target="#nav_list">-->
<!--                <span class="icon-bar"></span>-->
<!--                <span class="icon-bar"></span>-->
<!--                <span class="icon-bar"></span>-->
<!--            </button>-->

        </div>
<!--        <div class="collapse navbar-collapse" id="nav_list">-->
<!--            <ul class="nav navbar-nav navbar-right">-->
<!--                <li><a href="<?php echo url('index/index');?>"><span class="glyphicon glyphicon-home"></span> 首页</a></li>-->
<!--                <li><a href="<?php echo url('game/index');?>"><span class="glyphicon glyphicon-th-large"></span> 游戏乐园</a></li>-->
<!--                <?php if($info->usersid > 0){?>-->
<!--                <li><a href="<?php echo url('users/index');?>"><span class="glyphicon glyphicon-user"></span> 会员</a></li>-->
<!--                <li><a href="<?php echo url('users/out');?>"><span class="glyphicon glyphicon-off"></span> 退出</a></li>-->
<!--                <?php }?>-->
<!--            </ul>-->
<!--        </div>-->


    </div>
</nav>
<div id="main">
    <div class="container-fluid">
        <div class="row white_bg">
            <div class="login_member"><img src="<?php echo isset($skin)?$skin:"";?>img/login_member.png" class="img-responsive" alt="会员登陆"></div>
            <form action="" class="login_form" method="post">
                <div class="input-group input-group-lg mt10 mb10">
                    <div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div>
                    <input type="n" name="mobile" id="user" class="form-control" placeholder="请输入用户名" >
                </div>
                <div class="input-group input-group-lg mb10">
                    <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
                    <input type="password" class="form-control" name="password" id="pass" placeholder="请输入密码" >
                </div>
                <div class="input-group input-group-lg mb10">
                    <div class="input-group-addon"><span class=" glyphicon glyphicon-equalizer"></span></div>
                    <input type="text" class="form-control" name="captcha" id="captcha" placeholder="验证码" >
                     <span class="input-group-addon"><img src="vcode.php" alt="" onclick="this.src='vcode.php?tm=' + Math.random();"  style="cursor:pointer;" /></span>
                </div>
                <button class="btn btn-danger btn-block btn-lg " name="click" type="button" onclick="login()">我要登陆</button>
            </form>
        </div>
    </div>
</div>
﻿<nav class="navbar-default navbar-fixed-bottom nav_bg">
    <div class="container-fluid nav-li">
        <ul class="nav navbar-nav">
            <li><a href="mobile.php"><span class="glyphicon glyphicon-home"></span> <b>首页</b></a></li>
            <li><a href="<?php echo url('game/index');?>"><span class="glyphicon glyphicon-th-large"></span> <b>游戏乐园</b></a></li>
            <li><a href="<?php echo url('users/index');?>"><span class="glyphicon glyphicon-user"></span> <b>会员</b></a></li>
        </ul>
    </div>
</nav>
<div style="display: none">
<script>var lainframe;</script>

<div class="footer">
    <p>客服QQ:76500811 <a href="http://wpa.qq.com/msgrd?v=3&uin=76500811&site=qq&menu=yes">在线客服</a></p>
</div>
<script language="javascript" type="text/javascript">
    function login(){
        var mobile=$("input[name=mobile]").val();
        var re = /^1\d{10}$/
        if (!re.test(mobile)) {
            alerts("请输入正确的手机号码");
            return false;
        }
        var pass=$("input[name=password]").val();
        if(pass.length>20 || pass.length<6){
            alerts('请保持密码长度在6-12位');
            return false;
        }
        var captcha=$("input[name=captcha]").val();
        if(captcha.length!=4){
            alerts("请输入验证码");
            return false;
        }
        $.post('<?php echo url('users/login');?>', {mobile: mobile,captcha:captcha,password:pass,cpassword:captcha}, function(data){
            if(data.status>0){
                alerts(data.message);
            }else{
                location.href='<?php echo url('index/index');?>';
            }
        }, 'json');
        return false;
    }


    function alerts(msg) {
        alert(msg);
    }
</script>
</body>
</html>
